package br.ufrgs.inf.sissw.app;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.PopupWindow;

public class InfAppActivity extends Activity {
	private PopupWindow pw;
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);

		requestWindowFeature(Window.FEATURE_NO_TITLE);

		setContentView(R.layout.main);
	}

	public void onClickFeature(View v) {
		int id = v.getId();
		switch (id) {
		
		case R.id.button_ru:
			startActivity(new Intent(getApplicationContext(), RuActivity.class));
			break;
			
		case R.id.button_twitter:			
			Uri uri = Uri.parse( "http://www.twitter.com/INF_UFRGS" );
			startActivity( new Intent( Intent.ACTION_VIEW, uri ) );
			//startActivity(new Intent(getApplicationContext(), TwitterActivity.class));
			break;
						
		case R.id.button_maps:
			startActivity(new Intent(getApplicationContext(), MapsActivity.class));
			break;
			
		case R.id.button_schedule:
			startActivity(new Intent(getApplicationContext(), AgendaActivity.class));
			break;
			
		case R.id.button_contacts:
			startActivity(new Intent(getApplicationContext(), ContactsActivity.class));
			break;
			
		case R.id.button_about:
			startActivity(new Intent(getApplicationContext(), AboutActivity.class));
			
		default:
			break;
		}
	}
	
}